<?php

/**
 * @author shuang
 * @date 2016-11-3 13:52:19
 */
use yii\helpers\ArrayHelper;

$this->registerCssFile('/css/friends.css', ['depends' => ['frontendx\assets\AppAsset']]);
?>
<img class="friends-banner" src="../images/friends-banner.png"> </img>
<div class="info-content">
    <div class="face">
        <img src="../images/face.png" alt=""/>
    </div>
    <div class="info-text">
        <div class="left">
            <span><?php echo $mytuicount;?>人</span>
            <small>我的小伙伴</small>
        </div>
        <div class="right">
            <span>¥ <?php echo Yii::$app->formatter->asDecimal(Yii::$app->user->identity->wallet->offline_amount); ?></span>
            <small>邀请收入</small>
        </div>
    </div>
</div>
<div class="user-list">
    <?php foreach ($data as $item): ?> 
    <div class="group">
        <div class="face">
            <img src="./assets/images/face.png" alt=""/>
        </div>
        <div class="text">
            <span><?php echo ArrayHelper::getValue($item, "username"); ?></span>
            <p>她的小伙伴：<?php echo \frontendx\models\WB_UserProfile::getInviteCount($item['my_code']);?>人&nbsp;&nbsp;完成任务：<?php echo ArrayHelper::getValue($item, "taskcount"); ?>个</p>
        </div>
    </div>
    <?php endforeach; ?>
</div>